using System;
using System.Collections.Generic;
using System.Text;

namespace GameFramework
{
    public abstract class Action
    {
        protected Entity source = null;
        protected Entity target = null;

        public Action()
        {
        }

        public Action(Entity source)
        {
            this.source = source;
        }

        public Action(Entity source, Entity target)
        {
            this.source = source;
            this.target = target;
        }

        public void Set(Entity source, Entity target)
        {
            this.source = source;
            this.target = target;
        }

        public void SetSource(Entity source)
        {
            this.source = source;
        }

        public abstract void Run();

        public virtual void Terminate()
        {
            Activate(false);
        }

        public void Activate(bool value)
        {
            GameManager.GetCurrent().ActivateAction(this, value);
        }

    }
}
